<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>火电机组冷端优化系统</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        :root {
            --primary-bg: #0f172a;
            --secondary-bg: #1e293b;
            --card-bg: #1a2435;
            --accent: #5eead4;
            --accent-hover: #88f3e2;
            --text-primary: #e2e8f0;
            --text-secondary: #94a3b8;
            --text-tertiary: #64748b;
            --border-color: #334155;
            --font-main: 'Segoe UI', 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
            --spacing-sm: 8px;
            --spacing-md: 16px;
            --spacing-lg: 24px;
            --spacing-xl: 32px;
            --radius-sm: 4px;
            --radius-md: 8px;
            --radius-lg: 12px;
        }
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            background: var(--primary-bg);
            color: var(--text-primary);
            font-family: var(--font-main);
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        
        /* 导航栏容器 */
        .navbar {
            background: var(--secondary-bg);
            border-bottom: 1px solid var(--border-color);
            padding: 0 var(--spacing-lg);
            height: 60px;
            display: flex;
            align-items: center;
            z-index: 100;
        }
        
        /* Logo区域 */
        .logo-area {
            display: flex;
            align-items: center;
            gap: var(--spacing-md);
            padding-right: var(--spacing-lg);
            border-right: 1px solid var(--border-color);
        }
        
        .logo-icon {
            width: 36px;
            height: 36px;
            background: var(--accent);
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--primary-bg);
            font-size: 1rem;
        }
        
        .logo-text {
            font-size: 1.2rem;
            font-weight: 600;
            background: linear-gradient(to right, var(--text-primary), var(--accent));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }
        
        /* 导航区域 */
        .nav-area {
            flex: 1;
            padding: 0 var(--spacing-xl);
            display: flex;
        }
        
        .nav-menu {
            display: flex;
            list-style: none;
            gap: var(--spacing-xl);
        }
        
        .nav-item {
            position: relative;
        }
        
        .nav-link {
            color: var(--text-secondary);
            text-decoration: none;
            font-weight: 500;
            display: flex;
            align-items: center;
            gap: var(--spacing-sm);
            padding: var(--spacing-sm) var(--spacing-md);
            border-radius: var(--radius-sm);
            transition: all 0.3s ease;
        }
        
        .nav-link:hover, .nav-link.active {
            color: var(--accent);
            background: rgba(94, 234, 212, 0.1);
        }
        
        .nav-link i {
            font-size: 0.9rem;
        }
        
        /* 下拉菜单 */
        .submenu {
            position: absolute;
            top: 100%;
            left: 0;
            background: var(--secondary-bg);
            border-radius: var(--radius-sm);
            min-width: 180px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
            border: 1px solid var(--border-color);
            z-index: 200;
            display: none;
            padding: var(--spacing-sm) 0;
        }
        
        .nav-item:hover .submenu {
            display: block;
        }
        
        .submenu-item {
            padding: var(--spacing-sm) var(--spacing-md);
        }
        
        .submenu-link {
            color: var(--text-secondary);
            text-decoration: none;
            display: block;
            padding: var(--spacing-sm) var(--spacing-md);
            border-radius: var(--radius-sm);
            transition: all 0.3s ease;
        }
        
        .submenu-link:hover {
            color: var(--accent);
            background: rgba(94, 234, 212, 0.1);
        }
        
        /* 用户区域 */
        .user-area {
            display: flex;
            align-items: center;
            gap: var(--spacing-md);
            position: relative;
        }
        
        .user-avatar {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background: linear-gradient(45deg, var(--accent), #4a7bff);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 0.9rem;
        }
        
        .user-dropdown {
            position: absolute;
            top: 100%;
            right: 0;
            background: var(--secondary-bg);
            min-width: 200px;
            border-radius: var(--radius-sm);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
            border: 1px solid var(--border-color);
            padding: var(--spacing-md);
            z-index: 200;
            display: none;
        }
        
        .user-dropdown.active {
            display: block;
        }
        
        .user-info {
            padding: var(--spacing-sm) 0 var(--spacing-md);
            border-bottom: 1px solid var(--border-color);
            margin-bottom: var(--spacing-sm);
        }
        
        .user-name {
            font-weight: 600;
            margin-bottom: var(--spacing-xs);
        }
        
        .user-role {
            color: var(--text-secondary);
            font-size: 0.85rem;
        }
        
        .dropdown-item {
            padding: var(--spacing-sm) 0;
        }
        
        .dropdown-link {
            color: var(--text-primary);
            text-decoration: none;
            display: flex;
            align-items: center;
            gap: var(--spacing-sm);
            padding: var(--spacing-sm) var(--spacing-sm);
            border-radius: var(--radius-sm);
            transition: all 0.3s ease;
        }
        
        .dropdown-link:hover {
            background: rgba(94, 234, 212, 0.1);
            color: var(--accent);
        }
        
        /* 内容区域 */
        .content-area {
            flex: 1;
            padding: var(--spacing-xl);
            overflow: auto;
            background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="%231a2435"/><path d="M20,20 L80,20 L80,80 L20,80 Z" stroke="%23334155" fill="none" stroke-width="0.5"/></svg>');
            background-size: 20px 20px;
        }
        
        .content-placeholder {
            text-align: center;
            color: var(--text-secondary);
            padding: var(--spacing-xl);
            border: 1px dashed var(--border-color);
            border-radius: var(--radius-md);
            max-width: 700px;
            margin: 0 auto;
        }
        
        .content-placeholder i {
            font-size: 3rem;
            margin-bottom: var(--spacing-md);
            color: var(--text-tertiary);
        }
        
        .content-placeholder h2 {
            margin-bottom: var(--spacing-md);
            font-weight: 500;
        }
        
        /* 模态框 */
        .modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.7);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 300;
            visibility: hidden;
            opacity: 0;
            transition: all 0.3s ease;
        }
        
        .modal.active {
            visibility: visible;
            opacity: 1;
        }
        
        .modal-content {
            background: var(--card-bg);
            border-radius: var(--radius-md);
            width: 100%;
            max-width: 500px;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
            overflow: hidden;
            transform: translateY(20px);
            transition: transform 0.3s ease;
        }
        
        .modal.active .modal-content {
            transform: translateY(0);
        }
        
        .modal-header {
            padding: var(--spacing-lg);
            background: rgba(26, 36, 53, 0.7);
            border-bottom: 1px solid var(--border-color);
        }
        
        .modal-title {
            font-size: 1.4rem;
            color: var(--accent);
        }
        
        .modal-body {
            padding: var(--spacing-xl);
        }
        
        .modal-footer {
            padding: var(--spacing-lg);
            background: rgba(26, 36, 53, 0.7);
            border-top: 1px solid var(--border-color);
            display: flex;
            justify-content: flex-end;
            gap: var(--spacing-md);
        }
        
        .form-group {
            margin-bottom: var(--spacing-lg);
        }
        
        .form-label {
            display: block;
            margin-bottom: var(--spacing-sm);
            color: var(--text-primary);
            font-weight: 500;
        }
        
        .form-input {
            width: 100%;
            padding: var(--spacing-md);
            background: rgba(26, 36, 53, 0.7);
            border: 1px solid var(--border-color);
            border-radius: var(--radius-sm);
            color: var(--text-primary);
            font-family: var(--font-main);
            transition: all 0.3s ease;
        }
        
        .form-input:focus {
            outline: none;
            border-color: var(--accent);
            box-shadow: 0 0 0 2px rgba(94, 234, 212, 0.1);
        }
        
        .btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: var(--spacing-sm) var(--spacing-md);
            border-radius: var(--radius-sm);
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease;
            border: none;
            font-family: var(--font-main);
            text-align: center;
            gap: 8px;
        }
        
        .btn-primary {
            background: rgba(94, 234, 212, 0.2);
            color: #ffffff;
            border: 1px solid rgba(94, 234, 212, 0.4);
        }
        
        .btn-primary:hover {
            background: rgba(94, 234, 212, 0.3);
        }
        
        .btn-secondary {
            background: rgba(148, 163, 184, 0.15);
            color: var(--text-primary);
            border: 1px solid var(--border-color);
        }
        
        .btn-secondary:hover {
            background: rgba(148, 163, 184, 0.25);
            color: #ffffff;
        }
    </style>
</head>
<body>
    <!-- 导航栏 -->
    <nav class="navbar">
        <!-- Logo区域 -->
        <div class="logo-area">
            <div class="logo-icon">
                <i class="fas fa-bolt"></i>
            </div>
            <div class="logo-text">冷端优化系统</div>
        </div>
        
        <!-- 功能导航区 -->
        <div class="nav-area">
            <ul class="nav-menu">
                <li class="nav-item">
                    <a href="#" class="nav-link">
                        <i class="fas fa-tachometer-alt"></i> 驾驶舱
                    </a>
                </li>
                
                <li class="nav-item">
                    <a href="#" class="nav-link">
                        <i class="fas fa-cogs"></i> 核心功能
                        <i class="fas fa-chevron-down"></i>
                    </a>
                    <ul class="submenu">
                        <li class="submenu-item">
                            <a href="#" class="submenu-link">
                                <i class="fas fa-tachometer-alt"></i> 背压分析
                            </a>
                        </li>
                        <li class="submenu-item">
                            <a href="#" class="submenu-link">
                                <i class="fas fa-broom"></i> 清洁分析
                            </a>
                        </li>
                        <li class="submenu-item">
                            <a href="#" class="submenu-link">
                                <i class="fas fa-snowflake"></i> 冬季防冻
                            </a>
                        </li>
                    </ul>
                </li>
                
                <li class="nav-item">
                    <a href="#" class="nav-link">
                        <i class="fas fa-brain"></i> AI智能分析
                        <i class="fas fa-chevron-down"></i>
                    </a>
                    <ul class="submenu">
                        <li class="submenu-item">
                            <a href="#" class="submenu-link">
                                <i class="fas fa-comments"></i> 对话式分析
                            </a>
                        </li>
                        <li class="submenu-item">
                            <a href="#" class="submenu-link">
                                <i class="fas fa-search"></i> 检索式分析
                            </a>
                        </li>
                    </ul>
                </li>
                
                <li class="nav-item">
                    <a href="#" class="nav-link">
                        <i class="fas fa-chart-bar"></i> 报表
                    </a>
                </li>
            </ul>
        </div>
        
        <!-- 用户区域 -->
        <div class="user-area">
            <div class="user-avatar" id="userAvatar">
                <i class="fas fa-user"></i>
            </div>
            <div class="user-dropdown" id="userDropdown">
                <div class="user-info">
                    <div class="user-name">管理员</div>
                    <div class="user-role">系统管理员</div>
                </div>
                
                <div class="dropdown-item">
                    <a href="#" class="dropdown-link" id="openChangePassword">
                        <i class="fas fa-key"></i> 修改密码
                    </a>
                </div>
                
                <div class="dropdown-item">
                    <a href="#" class="dropdown-link">
                        <i class="fas fa-user-circle"></i> 个人中心
                    </a>
                </div>
                
                <div class="dropdown-item">
                    <a href="#" class="dropdown-link">
                        <i class="fas fa-sign-out-alt"></i> 退出登录
                    </a>
                </div>
            </div>
        </div>
    </nav>
    
    <!-- 内容区域 -->
    <div class="content-area">
        <div class="content-placeholder">
            <i class="fas fa-cogs"></i>
            <h2>系统功能区域</h2>
            <p>此区域将根据选择的导航菜单显示对应功能</p>
        </div>
    </div>
    
    <!-- 修改密码模态框 -->
    <div class="modal" id="passwordModal">
        <div class="modal-content">
            <div class="modal-header">
                <h3 class="modal-title">
                    <i class="fas fa-key"></i> 修改密码
                </h3>
            </div>
            
            <div class="modal-body">
                <form id="passwordForm">
                    <div class="form-group">
                        <label for="currentPassword" class="form-label">当前密码</label>
                        <input type="password" id="currentPassword" class="form-input" required>
                    </div>
                    
                    <div class="form-group">
                        <label for="newPassword" class="form-label">新密码</label>
                        <input type="password" id="newPassword" class="form-input" required>
                    </div>
                    
                    <div class="form-group">
                        <label for="confirmPassword" class="form-label">确认新密码</label>
                        <input type="password" id="confirmPassword" class="form-input" required>
                    </div>
                </form>
            </div>
            
            <div class="modal-footer">
                <button class="btn btn-secondary" id="cancelChangePassword">
                    取消
                </button>
                <button class="btn btn-primary" id="submitChangePassword">
                    保存更改
                </button>
            </div>
        </div>
    </div>
    
    <script>
        // 用户头像下拉菜单交互
        const userAvatar = document.getElementById('userAvatar');
        const userDropdown = document.getElementById('userDropdown');
        const passwordModal = document.getElementById('passwordModal');
        const openChangePassword = document.getElementById('openChangePassword');
        const cancelChangePassword = document.getElementById('cancelChangePassword');
        
        // 切换用户下拉菜单
        userAvatar.addEventListener('click', function(e) {
            e.stopPropagation();
            userDropdown.classList.toggle('active');
        });
        
        // 点击其他地方关闭下拉菜单
        document.addEventListener('click', function(e) {
            if (!userDropdown.contains(e.target) && e.target !== userAvatar) {
                userDropdown.classList.remove('active');
            }
        });
        
        // 打开修改密码模态框
        openChangePassword.addEventListener('click', function(e) {
            e.preventDefault();
            userDropdown.classList.remove('active');
            passwordModal.classList.add('active');
        });
        
        // 关闭模态框
        cancelChangePassword.addEventListener('click', function() {
            passwordModal.classList.remove('active');
        });
        
        // 提交密码修改
        document.getElementById('submitChangePassword').addEventListener('click', function() {
            const currentPassword = document.getElementById('currentPassword').value;
            const newPassword = document.getElementById('newPassword').value;
            const confirmPassword = document.getElementById('confirmPassword').value;
            
            if (newPassword !== confirmPassword) {
                alert('新密码和确认密码不一致！');
                return;
            }
            
            if (newPassword.length < 6) {
                alert('密码长度至少为6位！');
                return;
            }
            
            // 在实际项目中这里会有API调用
            console.log('修改密码:', {
                currentPassword,
                newPassword
            });
            
            alert('密码已成功更新！');
            passwordModal.classList.remove('active');
            
            // 清空表单
            document.getElementById('currentPassword').value = '';
            document.getElementById('newPassword').value = '';
            document.getElementById('confirmPassword').value = '';
        });
        
        // 点击模态框背景关闭模态框
        passwordModal.addEventListener('click', function(e) {
            if (e.target === passwordModal) {
                passwordModal.classList.remove('active');
            }
        });
        
        // 防止模态框内容点击关闭
        document.querySelector('.modal-content').addEventListener('click', function(e) {
            e.stopPropagation();
        });
    </script>
</body>
</html>
